package com.css.dzj.dzjap.modules.executorinfo.entity;

/**
 * 执法人员信息实体类
 */

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "AP_EXECUTOR_INFO", schema = "DZJAP", catalog = "")
public class ApExecutorInfoEntity {
    private String id;                          //唯一标识
    private String executorName;                //姓名
    private String executorOrganization;        //所属主体（受委托组织）全称
    private String executorIdCard;              //18位身份证号编码
    private String executorSex;                 //性别 1:未知的性别 2:男 3:女 4:女性改（变）为男性 5:男性改（变）为女性 6:未说明的类别
    private Date executorBirthday;            //出生日期
    private String executorPoliticStatus;       //政治面貌 1 中共党员 2 中共预备党员 3 共青团员 4 民革党员 5 民盟盟员 6 民建会员 7 民进会员 8 农工党党员 9 致公党党员 10 九三学社社员 11 台盟盟员 12 无党派人士 13 群众
    private String executorLevel;               //职级 1 省部级正职 2 省部级副职 3 厅局级正职（巡视员）4 厅局级副职（副巡视员）5 县处级正职（调研员）6 县处级副职（副调研员）7 乡科级正职（主任科员）8 乡科级副职（副主任科员）9 科员 10 办事员 11 其他
    private String executorNationality;         //民族
    private String executorEducation;           //最高学历
    private String executorCharacter;           //执法人员性质 1 公务员 2 聘任制公务员 3 事业编制工作人员 4 企业人员 5 执法辅助人员
    private String executorSuperviseStatus;     //是否监督人员 0 否 1 是
    private String executorLegalQualification;  //是否具有法律职业资格 0 否 1 是
    private String executorPhoneNum;            //联系电话
    private String executorCode;                //执法证号
    private String executorMajor;               //学历专业
    private String executorCertifyingAuthority; //发证机关
    private String executorArea;                //执法区域
    private String executorCategory;            //执法类别
    private Date executorCardInDate;            //执法证有效期
    private Date executorCreateTime;            //创建时间
    private Date executorUpdateTime;            //更新时间
    private String executorDelFlag;             //删除标记 0 未删除 1 已删除
    private String executorLocation;//执法人员地址

    @Id
    @Column(name = "ID")
    //雪花算法生成ID
    @GeneratedValue(generator = "SnowflakeId")
    @GenericGenerator(name = "SnowflakeId",strategy = "com.css.dzj.dzjap.common.util.SnowflakeId")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "EXECUTOR_NAME")
    public String getExecutorName() {
        return executorName;
    }

    public void setExecutorName(String executorName) {
        this.executorName = executorName;
    }

    @Basic
    @Column(name = "EXECUTOR_ORGANIZATION")
    public String getExecutorOrganization() {
        return executorOrganization;
    }

    public void setExecutorOrganization(String executorOrganization) {
        this.executorOrganization = executorOrganization;
    }

    @Basic
    @Column(name = "EXECUTOR_ID_CARD")
    public String getExecutorIdCard() {
        return executorIdCard;
    }

    public void setExecutorIdCard(String executorIdCard) {
        this.executorIdCard = executorIdCard;
    }

    @Basic
    @Column(name = "EXECUTOR_SEX")
    public String getExecutorSex() {
        return executorSex;
    }

    public void setExecutorSex(String executorSex) {
        this.executorSex = executorSex;
    }

    @Basic
    @Column(name = "EXECUTOR_BIRTHDAY")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")//设置日期格式
    public Date getExecutorBirthday() {
        return executorBirthday;
    }

    public void setExecutorBirthday(Date executorBirthday) {
        this.executorBirthday = executorBirthday;
    }

    @Basic
    @Column(name = "EXECUTOR_POLITIC_STATUS")
    public String getExecutorPoliticStatus() {
        return executorPoliticStatus;
    }

    public void setExecutorPoliticStatus(String executorPoliticStatus) {
        this.executorPoliticStatus = executorPoliticStatus;
    }

    @Basic
    @Column(name = "EXECUTOR_LEVEL")
    public String getExecutorLevel() {
        return executorLevel;
    }

    public void setExecutorLevel(String executorLevel) {
        this.executorLevel = executorLevel;
    }

    @Basic
    @Column(name = "EXECUTOR_NATIONALITY")
    public String getExecutorNationality() {
        return executorNationality;
    }

    public void setExecutorNationality(String executorNationality) {
        this.executorNationality = executorNationality;
    }

    @Basic
    @Column(name = "EXECUTOR_EDUCATION")
    public String getExecutorEducation() {
        return executorEducation;
    }

    public void setExecutorEducation(String executorEducation) {
        this.executorEducation = executorEducation;
    }

    @Basic
    @Column(name = "EXECUTOR_CHARACTER")
    public String getExecutorCharacter() {
        return executorCharacter;
    }

    public void setExecutorCharacter(String executorCharacter) {
        this.executorCharacter = executorCharacter;
    }

    @Basic
    @Column(name = "EXECUTOR_SUPERVISE_STATUS")
    public String getExecutorSuperviseStatus() {
        return executorSuperviseStatus;
    }

    public void setExecutorSuperviseStatus(String executorSuperviseStatus) {
        this.executorSuperviseStatus = executorSuperviseStatus;
    }

    @Basic
    @Column(name = "EXECUTOR_LEGAL_QUALIFICATION")
    public String getExecutorLegalQualification() {
        return executorLegalQualification;
    }

    public void setExecutorLegalQualification(String executorLegalQualification) {
        this.executorLegalQualification = executorLegalQualification;
    }

    @Basic
    @Column(name = "EXECUTOR_PHONE_NUM")
    public String getExecutorPhoneNum() {
        return executorPhoneNum;
    }

    public void setExecutorPhoneNum(String executorPhoneNum) {
        this.executorPhoneNum = executorPhoneNum;
    }

    @Basic
    @Column(name = "EXECUTOR_CODE")
    public String getExecutorCode() {
        return executorCode;
    }

    public void setExecutorCode(String executorCode) {
        this.executorCode = executorCode;
    }

    @Basic
    @Column(name = "EXECUTOR_MAJOR")
    public String getExecutorMajor() {
        return executorMajor;
    }

    public void setExecutorMajor(String executorMajor) {
        this.executorMajor = executorMajor;
    }

    @Basic
    @Column(name = "EXECUTOR_CERTIFYING_AUTHORITY")
    public String getExecutorCertifyingAuthority() {
        return executorCertifyingAuthority;
    }

    public void setExecutorCertifyingAuthority(String executorCertifyingAuthority) {
        this.executorCertifyingAuthority = executorCertifyingAuthority;
    }

    @Basic
    @Column(name = "EXECUTOR_AREA")
    public String getExecutorArea() {
        return executorArea;
    }

    public void setExecutorArea(String executorArea) {
        this.executorArea = executorArea;
    }

    @Basic
    @Column(name = "EXECUTOR_CATEGORY")
    public String getExecutorCategory() {
        return executorCategory;
    }

    public void setExecutorCategory(String executorCategory) {
        this.executorCategory = executorCategory;
    }

    @Basic
    @Column(name = "EXECUTOR_CARD_IN_DATE")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getExecutorCardInDate() {
        return executorCardInDate;
    }

    public void setExecutorCardInDate(Date executorCardInDate) {
        this.executorCardInDate = executorCardInDate;
    }

    @Basic
    @Column(name = "EXECUTOR_CREATE_TIME")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
    public Date getExecutorCreateTime() {
        return executorCreateTime;
    }

    public void setExecutorCreateTime(Date executorCreateTime) {
        this.executorCreateTime = executorCreateTime;
    }

    @Basic
    @Column(name = "EXECUTOR_UPDATE_TIME")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
    public Date getExecutorUpdateTime() {
        return executorUpdateTime;
    }

    public void setExecutorUpdateTime(Date executorUpdateTime) {
        this.executorUpdateTime = executorUpdateTime;
    }

    @Basic
    @Column(name = "EXECUTOR_DEL_FLAG")
    public String getExecutorDelFlag() {
        return executorDelFlag;
    }

    public void setExecutorDelFlag(String executorDelFlag) {
        this.executorDelFlag = executorDelFlag;
    }

    @Basic
    @Column(name = "EXECUTOR_LOCATION")
    public String getExecutorLocation() {
        return executorLocation;
    }

    public void setExecutorLocation(String executorLocation) {
        this.executorLocation = executorLocation;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ApExecutorInfoEntity that = (ApExecutorInfoEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(executorName, that.executorName) &&
                Objects.equals(executorOrganization, that.executorOrganization) &&
                Objects.equals(executorIdCard, that.executorIdCard) &&
                Objects.equals(executorSex, that.executorSex) &&
                Objects.equals(executorBirthday, that.executorBirthday) &&
                Objects.equals(executorPoliticStatus, that.executorPoliticStatus) &&
                Objects.equals(executorLevel, that.executorLevel) &&
                Objects.equals(executorNationality, that.executorNationality) &&
                Objects.equals(executorEducation, that.executorEducation) &&
                Objects.equals(executorCharacter, that.executorCharacter) &&
                Objects.equals(executorSuperviseStatus, that.executorSuperviseStatus) &&
                Objects.equals(executorLegalQualification, that.executorLegalQualification) &&
                Objects.equals(executorPhoneNum, that.executorPhoneNum) &&
                Objects.equals(executorCode, that.executorCode) &&
                Objects.equals(executorMajor, that.executorMajor) &&
                Objects.equals(executorCertifyingAuthority, that.executorCertifyingAuthority) &&
                Objects.equals(executorArea, that.executorArea) &&
                Objects.equals(executorCategory, that.executorCategory) &&
                Objects.equals(executorCardInDate, that.executorCardInDate) &&
                Objects.equals(executorCreateTime, that.executorCreateTime) &&
                Objects.equals(executorUpdateTime, that.executorUpdateTime) &&
                Objects.equals(executorDelFlag, that.executorDelFlag)&&
                Objects.equals(executorLocation, that.executorLocation);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, executorName, executorOrganization, executorIdCard, executorSex, executorBirthday, executorPoliticStatus, executorLevel, executorNationality, executorEducation, executorCharacter, executorSuperviseStatus, executorLegalQualification, executorPhoneNum, executorCode, executorMajor, executorCertifyingAuthority, executorArea, executorCategory, executorCardInDate, executorCreateTime, executorUpdateTime, executorDelFlag,executorLocation);
    }
}
